﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Sisocana.Core.Models.SiteModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Create a new Site
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        Create new Site</h2>
    <script src="<%: Url.Content("~/Scripts/jquery.validate.min.js") %>" type="text/javascript"></script>
    <script src="<%: Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js") %>"
        type="text/javascript"></script>
    <script src="<%: Url.Content("~/Scripts/jquery-1.5.1.js") %>" type="text/javascript"></script>
    <script src="<%: Url.Content("~/Scripts/jquery-ui-1.8.11.js") %>" type="text/javascript"></script>
    <link href="<%: Url.Content("~/Content/themes/base/jquery.ui.all.css") %>" rel="stylesheet"
        type="text/css" />
    <script language="javascript" type="text/javascript">
        $(document).ready(function () {

            $("button, input:submit , input:file ").button();
        });
    </script>
    <% Html.EnableClientValidation(); %>
    <% using (Html.BeginForm())
       { %>
    <%: Html.ValidationSummary(true) %>
    <fieldset>
        <legend>Site</legend>
        <div id="containerCenter">
            <div id="leftCenter">
                <div class="editor-label">
                    <%: Html.LabelFor(model => model.nombreCatastrofe, "Catastrophe Name")%>
                </div>
                <div class="editor-label">
                    <%: Html.TextBoxFor(model => model.nombreCatastrofe, new{ rows=1 })%>
                    <%: Html.ValidationMessageFor(model => model.nombreCatastrofe) %>
                </div>
                <div class="editor-label">
                    <%: Html.LabelFor(model => model.tituloWeb, "Site Title")%>
                </div>
                <div class="editor-field">
                    <%: Html.TextBoxFor(model => model.tituloWeb)%>
                    <%: Html.ValidationMessageFor(model => model.tituloWeb) %>
                </div>
                <div class="editor-label">
                    <%: Html.LabelFor(model => model.subtituloWeb, "Site Subtitle")%>
                </div>
                <div class="editor-field">
                    <%: Html.TextBoxFor(model => model.subtituloWeb)%>
                    <%: Html.ValidationMessageFor(model => model.subtituloWeb) %>
                </div>
                <div class="editor-label">
                    <%: Html.LabelFor(model => model.descripcion, "Description") %>
                </div>
                <div class="editor-field">
                    <%: Html.TextAreaFor(model => model.descripcion,2,23,null)%>
                    <%: Html.ValidationMessageFor(model => model.descripcion) %>
                </div>                  
            </div>
            <div id="rightCenter">
                <div class="editor-label">
                    <%: Html.LabelFor(model => model.fecha, "Catastrophe Date")%>
                </div>
                <div class="editor-field">
                    <%: Html.TextBoxFor(model => model.fecha)%>
                    <%: Html.ValidationMessageFor(model => model.fecha) %>
                </div>
                <script language="javascript" type="text/javascript">
                    $(document).ready(function () {
                        $("#fecha").datepicker({ dateFormat: 'dd/mm/yy' });
                    });
                </script>          
                <div class="editor-label">
                    <%: Html.LabelFor(model => model.subdominio, "Subdomain") %>
                </div>
                <div class="editor-field">
                    <%: Html.TextBoxFor(model => model.subdominio) %>
                    <%: Html.ValidationMessageFor(model => model.subdominio) %>
                </div>
                <div class="editor-label">
                    <%: Html.LabelFor(model => model.mensajeHeader, "Header Message") %>
                </div>
                <div class="editor-field">
                    <%: Html.TextAreaFor(model => model.mensajeHeader,2,23,null)%>
                    <%: Html.ValidationMessageFor(model => model.mensajeHeader) %>
                </div>
                <div class="editor-label">
                    <%: Html.LabelFor(model => model.mensajeFooter, "Footer Message") %>
                </div>
                <div class="editor-field">
                    <%: Html.TextAreaFor(model => model.mensajeFooter,2,23,null)%>
                    <%: Html.ValidationMessageFor(model => model.mensajeFooter) %>
                </div>
                <br />
            </div>
        </div>
        <div>
            <% Html.RenderAction("showUsers", "Site"); %>
        </div>
        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
    <% } %>
    <div>
        <%: Html.ActionLink("Show Sites", "Index") %>
    </div>
</asp:Content>
